package org.creativor.rayson.transport.stream;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.PipedInputStream;
import org.creativor.rayson.api.TransferSocket;
import org.creativor.rayson.transport.api.TimeLimitConnection;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The class <code>DataInputImplTest</code> contains tests for the class
 * <code>{@link DataInputImpl}</code>.
 * <p>
 * Copyright Creativor Studio (c) 2011
 * 
 * @generatedBy CodePro at 11-5-7 上午3:16
 * @author Nick Zhang
 * @version $Revision: 1.0 $
 */
public class DataInputImplTest {
	/**
	 * Launch the test.
	 * 
	 * @param args
	 *            the command line arguments
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	public static void main(String[] args) {
		new org.junit.runner.JUnitCore().run(DataInputImplTest.class);
	}

	/**
	 * Perform pre-test initialization.
	 * 
	 * @throws Exception
	 *             if the initialization fails for some reason
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Before
	public void setUp() throws Exception {
		// TODO: add additional set up code here
	}

	/**
	 * Perform post-test clean-up.
	 * 
	 * @throws Exception
	 *             if the clean-up fails for some reason
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@After
	public void tearDown() throws Exception {
		// TODO: add additional tear down code here
	}

	/**
	 * Run the DataInputImpl(DataInput,TransferSocket,TimeLimitConnection)
	 * constructor test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testDataInputImpl_1() throws Exception {
		DataInput dataInput = new DataInputStream(new PipedInputStream());
		TransferSocket transferSocket = null;
		TimeLimitConnection connection = null;

		DataInputImpl result = new DataInputImpl(dataInput, transferSocket,
				connection);

		// TODO: add additional test code here
		assertNotNull(result);
	}

	/**
	 * Run the boolean readBoolean() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadBoolean_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		boolean result = fixture.readBoolean();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readBoolean(DataInputImpl.java:33)
		assertTrue(result);
	}

	/**
	 * Run the boolean readBoolean() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadBoolean_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		boolean result = fixture.readBoolean();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readBoolean(DataInputImpl.java:33)
		assertTrue(result);
	}

	/**
	 * Run the boolean readBoolean() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadBoolean_3() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		boolean result = fixture.readBoolean();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readBoolean(DataInputImpl.java:33)
		assertTrue(result);
	}

	/**
	 * Run the byte readByte() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadByte_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		byte result = fixture.readByte();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readByte(DataInputImpl.java:45)
		assertEquals((byte) 0, result);
	}

	/**
	 * Run the byte readByte() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadByte_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		byte result = fixture.readByte();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readByte(DataInputImpl.java:45)
		assertEquals((byte) 0, result);
	}

	/**
	 * Run the char readChar() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadChar_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		char result = fixture.readChar();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readChar(DataInputImpl.java:57)
		assertEquals(' ', result);
	}

	/**
	 * Run the char readChar() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadChar_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		char result = fixture.readChar();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readChar(DataInputImpl.java:57)
		assertEquals(' ', result);
	}

	/**
	 * Run the double readDouble() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadDouble_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		double result = fixture.readDouble();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readDouble(DataInputImpl.java:69)
		assertEquals(0.0, result, 0.1);
	}

	/**
	 * Run the double readDouble() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadDouble_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		double result = fixture.readDouble();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readDouble(DataInputImpl.java:69)
		assertEquals(0.0, result, 0.1);
	}

	/**
	 * Run the float readFloat() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadFloat_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		float result = fixture.readFloat();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readFloat(DataInputImpl.java:81)
		assertEquals(0.0f, result, 0.1f);
	}

	/**
	 * Run the float readFloat() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadFloat_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		float result = fixture.readFloat();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readFloat(DataInputImpl.java:81)
		assertEquals(0.0f, result, 0.1f);
	}

	/**
	 * Run the void readFully(byte[]) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadFully_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);
		byte[] b = new byte[] {};

		fixture.readFully(b);

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readFully(DataInputImpl.java:93)
	}

	/**
	 * Run the void readFully(byte[]) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadFully_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);
		byte[] b = new byte[] {};

		fixture.readFully(b);

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readFully(DataInputImpl.java:93)
	}

	/**
	 * Run the void readFully(byte[]) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadFully_3() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);
		byte[] b = new byte[] {};

		fixture.readFully(b);

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readFully(DataInputImpl.java:93)
	}

	/**
	 * Run the void readFully(byte[],int,int) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadFully_4() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);
		byte[] b = new byte[] {};
		int off = 1;
		int len = 1;

		fixture.readFully(b, off, len);

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readFully(DataInputImpl.java:105)
	}

	/**
	 * Run the void readFully(byte[],int,int) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadFully_5() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);
		byte[] b = new byte[] {};
		int off = 1;
		int len = 1;

		fixture.readFully(b, off, len);

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readFully(DataInputImpl.java:105)
	}

	/**
	 * Run the void readFully(byte[],int,int) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadFully_6() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);
		byte[] b = new byte[] {};
		int off = 1;
		int len = 1;

		fixture.readFully(b, off, len);

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readFully(DataInputImpl.java:105)
	}

	/**
	 * Run the int readInt() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadInt_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		int result = fixture.readInt();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readInt(DataInputImpl.java:117)
		assertEquals(0, result);
	}

	/**
	 * Run the int readInt() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadInt_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		int result = fixture.readInt();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readInt(DataInputImpl.java:117)
		assertEquals(0, result);
	}

	/**
	 * Run the String readLine() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadLine_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		String result = fixture.readLine();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readLine(DataInputImpl.java:129)
		assertNotNull(result);
	}

	/**
	 * Run the String readLine() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadLine_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		String result = fixture.readLine();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readLine(DataInputImpl.java:129)
		assertNotNull(result);
	}

	/**
	 * Run the long readLong() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadLong_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		long result = fixture.readLong();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readLong(DataInputImpl.java:141)
		assertEquals(0L, result);
	}

	/**
	 * Run the long readLong() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadLong_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		long result = fixture.readLong();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readLong(DataInputImpl.java:141)
		assertEquals(0L, result);
	}

	/**
	 * Run the short readShort() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadShort_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		short result = fixture.readShort();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readShort(DataInputImpl.java:153)
		assertEquals((short) 0, result);
	}

	/**
	 * Run the short readShort() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadShort_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		short result = fixture.readShort();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readShort(DataInputImpl.java:153)
		assertEquals((short) 0, result);
	}

	/**
	 * Run the int readUnsignedByte() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadUnsignedByte_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		int result = fixture.readUnsignedByte();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readUnsignedByte(DataInputImpl.java:165)
		assertEquals(0, result);
	}

	/**
	 * Run the int readUnsignedByte() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadUnsignedByte_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		int result = fixture.readUnsignedByte();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readUnsignedByte(DataInputImpl.java:165)
		assertEquals(0, result);
	}

	/**
	 * Run the int readUnsignedShort() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadUnsignedShort_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		int result = fixture.readUnsignedShort();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readUnsignedShort(DataInputImpl.java:177)
		assertEquals(0, result);
	}

	/**
	 * Run the int readUnsignedShort() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadUnsignedShort_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		int result = fixture.readUnsignedShort();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readUnsignedShort(DataInputImpl.java:177)
		assertEquals(0, result);
	}

	/**
	 * Run the String readUTF() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadUTF_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		String result = fixture.readUTF();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readUTF(DataInputImpl.java:189)
		assertNotNull(result);
	}

	/**
	 * Run the String readUTF() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testReadUTF_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);

		String result = fixture.readUTF();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.readUTF(DataInputImpl.java:189)
		assertNotNull(result);
	}

	/**
	 * Run the int skipBytes(int) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testSkipBytes_1() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);
		int n = 1;

		int result = fixture.skipBytes(n);

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.skipBytes(DataInputImpl.java:201)
		assertEquals(0, result);
	}

	/**
	 * Run the int skipBytes(int) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午3:16
	 */
	@Test
	public void testSkipBytes_2() throws Exception {
		DataInputImpl fixture = new DataInputImpl(new DataInputStream(
				new PipedInputStream()), (TransferSocket) null,
				(TimeLimitConnection) null);
		int n = 1;

		int result = fixture.skipBytes(n);

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.stream.DataStreamer.touch(DataStreamer.java:34)
		// at
		// org.creativor.rayson.transport.stream.DataInputImpl.skipBytes(DataInputImpl.java:201)
		assertEquals(0, result);
	}
}